package com.main.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="UPLOADER")
public class Uploader implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4267000709928316233L;
	
	private Integer id;
	private String name;
	private String email;
	private String password;
	private String avatar;
	private int postNumber;
	private int viewNumber;
	private int likeNumber;
	private int commentNumber;
	private Date createDate;
	private String description;

	public Uploader(){
		postNumber = 0;
		viewNumber = 0;
		likeNumber = 0;
		commentNumber = 0;
		createDate = new Date();
	}
	@Id
	@GenericGenerator(name="generator", strategy= "increment")
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator= "generator")
	@Column(name="Id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name="Name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name="Email")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name="Avatar")
	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	@Column(name="PostNumber")
	public int getPostNumber() {
		return postNumber;
	}

	public void setPostNumber(int postNumber) {
		this.postNumber = postNumber;
	}

	@Column(name="ViewNumber")
	public int getViewNumber() {
		return viewNumber;
	}

	public void setViewNumber(int viewNumber) {
		this.viewNumber = viewNumber;
	}

	@Column(name="LikeNumber")
	public int getLikeNumber() {
		return likeNumber;
	}

	public void setLikeNumber(int likeNumber) {
		this.likeNumber = likeNumber;
	}

	@Column(name="CommentNumber")
	public int getCommentNumber() {
		return commentNumber;
	}

	public void setCommentNumber(int commentNumber) {
		this.commentNumber = commentNumber;
	}

	@Column(name="CreateDate")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	@Column(name="Password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name="Description")
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
}
